package com.genius.mobile_page.siji.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;
import com.genius.adminmanager.other.entity.ResponseJson;
import com.genius.mobile_page.common.ResponseData;
import com.genius.mobile_page.pandian.service.PandianEveryService;
import com.genius.mobile_page.pandian.service.PandianService;
import com.genius.mobile_page.pingjia.service.PingjiaService;
import com.genius.mobile_page.siji.service.SijiqiandaoService;
import com.genius.workflow.log.ControllerLog;



@Controller
public class SijiqiandaoController {
	
	private Logger log = LoggerFactory.getLogger(SijiqiandaoController.class);
	@Autowired
    @Qualifier("sijiqiandaoService")
//	@Resource(name="PandianService")
	private SijiqiandaoService sijiqiandaoService;
	
    @ControllerLog(description="跳转到司机签到门店")
    @RequestMapping("/mobile_page/siji/toShop")
    public String toShop(){
        return "/views/mobile_page/siji/shop";
    }
    @ControllerLog(description="跳转到门店签到")
    @RequestMapping("/mobile_page/siji/toSiji_qiandao_item")
    public String toShop_daodian(){
        return "/views/mobile_page/siji/siji_qiandao_item";
    }
    
    @ControllerLog(description="查询签到门店位置信息")
   	@PostMapping("/mobile_page/sijiqiandao/getShopWeizhi")
       @ResponseBody
       public ResponseData getShopWeizhi(@RequestBody JSONObject parms){
   		log.info("查询签到门店位置信息请求--->"+parms);
   		ResponseData resData = sijiqiandaoService.getShopWeizhi(parms);
   		log.info("查询签到门店位置信息返回值--->"+resData);
           return resData;
   	}
    
    @ControllerLog(description="插入签到门店")
   	@PostMapping("/mobile_page/sijiqiandao/insertSiji_qiandao_every")
       @ResponseBody
       public ResponseData insertSiji_qiandao_every(@RequestBody JSONObject parms){
   		log.info("插入签到门店请求--->"+parms);
   		ResponseData resData = sijiqiandaoService.insertSiji_qiandao_every(parms);
   		log.info("插入签到门店返回值--->"+resData);
           return resData;
   	}
    
    @ControllerLog(description="查询签到条款")
   	@PostMapping("/mobile_page/sijiqiandao/getSiji_qiandao_item")
       @ResponseBody
       public ResponseData getSiji_qiandao_item(@RequestBody JSONObject parms){
   		log.info("查询签到条款请求--->"+parms);
   		ResponseData resData = sijiqiandaoService.getSiji_qiandao_item(parms);
   		log.info("查询签到条款返回值--->"+resData);
           return resData;
   	}
    
    @ControllerLog(description="更新编辑到店签到门店条款")
   	@PostMapping("/mobile_page/sijiqiandao/replaceSiji_qiandao_every_item")
       @ResponseBody
       public ResponseData replaceSiji_qiandao_every_item(@RequestBody JSONObject parms){
   		log.info("更新编辑到店签到门店条款请求--->"+parms);
   		ResponseData resData = sijiqiandaoService.replaceSiji_qiandao_every_item(parms);
   		log.info("更新编辑到店签到门店条款返回值--->"+resData);
           return resData;
   	}
}

